#include <QtGui/QApplication>
#include <QtDeclarative>
#include "settings.h"
#include <MDeclarativeCache>


Q_DECL_EXPORT int main(int argc, char *argv[])
{
	Settings settings;

//    QApplication app(argc, argv);
//    QDeclarativeView view;

//	view.rootContext()->setContextProperty("Settings", &settings);

//    view.setSource(QUrl("qrc:/qml/main.qml"));
//    view.showFullScreen();
//    return app.exec();


	QApplication *app = MDeclarativeCache::qApplication(argc, argv);
	QDeclarativeView *view = MDeclarativeCache::qDeclarativeView();

	view->rootContext()->setContextProperty("Settings", &settings);

	view->setSource(QUrl("qrc:/qml/main.qml"));
	view->showFullScreen();
	return app->exec();
}
